package com.netease.pris.c;

import android.content.ContentResolver;
import android.content.ContentUris;
import android.content.ContentValues;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.text.TextUtils;
import com.netease.pris.atom.u;
import com.netease.pris.provider.z;
import java.util.ArrayList;
import java.util.List;

public class m
{
  static String[] a;
  public static final int b = 0;
  public static final int c = 1;
  public static final int d = 2;
  public static final int e = 3;
  public static final int f = 4;
  public static final int g = 5;

  static
  {
    String[] arrayOfString = new String[6];
    arrayOfString[0] = "_id";
    arrayOfString[1] = "account";
    arrayOfString[2] = "uid";
    arrayOfString[3] = "status";
    arrayOfString[4] = "timestamp";
    arrayOfString[5] = "other";
    a = arrayOfString;
  }

  public static List a(Context paramContext, String paramString, List paramList)
  {
    Object localObject;
    if ((paramList == null) || (paramList.size() == 0) || (TextUtils.isEmpty(paramString)) || (paramContext == null))
      localObject = new ArrayList();
    while (true)
    {
      return localObject;
      StringBuilder localStringBuilder = new StringBuilder();
      localStringBuilder.append("account").append(" = '").append(paramString).append("' and ").append("uid").append(" in (");
      int i = 0;
      if (i < paramList.size())
      {
        localStringBuilder.append('\'').append(((u)paramList.get(i)).V()).append('\'');
        if (i != -1 + paramList.size())
          localStringBuilder.append(',');
        while (true)
        {
          i++;
          break;
          localStringBuilder.append(')');
        }
      }
      ArrayList localArrayList = new ArrayList();
      try
      {
        ContentResolver localContentResolver = paramContext.getContentResolver();
        Uri localUri = z.g;
        String[] arrayOfString = new String[1];
        arrayOfString[0] = "uid";
        Cursor localCursor = localContentResolver.query(localUri, arrayOfString, localStringBuilder.toString(), null, null);
        if ((localCursor != null) && (localCursor.moveToFirst()))
          do
            localArrayList.add(localCursor.getString(0));
          while (localCursor.moveToNext());
        if (localCursor != null)
          localCursor.close();
        localObject = localArrayList;
      }
      catch (Exception localException)
      {
        while (true)
          localException.printStackTrace();
      }
    }
  }

  protected static boolean a(Context paramContext, String paramString1, String paramString2)
  {
    boolean bool;
    if ((TextUtils.isEmpty(paramString1)) || (TextUtils.isEmpty(paramString2)) || (paramContext == null))
      bool = false;
    while (true)
    {
      return bool;
      String str = "account = '" + paramString1 + "' and " + "uid" + " = '" + paramString2 + "' and " + "status" + " = 1";
      try
      {
        Cursor localCursor = paramContext.getContentResolver().query(z.g, a, str, null, null);
        if (localCursor != null)
        {
          bool = localCursor.moveToFirst();
          localCursor.close();
        }
      }
      catch (Exception localException)
      {
        bool = false;
      }
    }
  }

  public static boolean b(Context paramContext, String paramString1, String paramString2)
  {
    int i = 1;
    if ((TextUtils.isEmpty(paramString1)) || (TextUtils.isEmpty(paramString2)) || (paramContext == null))
      i = 0;
    while (true)
    {
      return i;
      ContentValues localContentValues = new ContentValues();
      localContentValues.put("account", paramString1);
      localContentValues.put("uid", paramString2);
      localContentValues.put("status", Integer.valueOf(i));
      localContentValues.put("timestamp", Long.valueOf(System.currentTimeMillis()));
      Uri localUri = paramContext.getContentResolver().insert(z.g, localContentValues);
      if (localUri != null);
      try
      {
        long l = ContentUris.parseId(localUri);
        if (l >= 0L)
          continue;
        i = 0;
      }
      catch (Exception localException)
      {
        localException.printStackTrace();
        i = 0;
      }
    }
  }
}

/* Location:           D:\android\hack\dex2jar-0.0.9.8\classes_dex2jar.jar
 * Qualified Name:     com.netease.pris.c.m
 * JD-Core Version:    0.6.0
 */